package cn.model;

import cn.util.Toolsutil;

import java.sql.Timestamp;

public class TRoleSystemModel {
    private int id;
    private int roleid;
    private int sysid;
    private boolean isedit;
    private String createdate;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getRoleid() {
        return roleid;
    }

    public void setRoleid(int roleid) {
        this.roleid = roleid;
    }

    public int getSysid() {
        return sysid;
    }

    public void setSysid(int sysid) {
        this.sysid = sysid;
    }

    public boolean isIsedit() {
        return isedit;
    }

    public void setIsedit(boolean isedit) {
        this.isedit = isedit;
    }

    public String getCreatedate() {
        return Toolsutil.GetDateFormat(createdate);
    }

    public void setCreatedate(String createdate) {
        this.createdate = createdate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TRoleSystemModel that = (TRoleSystemModel) o;

        if (id != that.id) return false;
        if (roleid != that.roleid) return false;
        if (sysid != that.sysid) return false;
        if (isedit != that.isedit) return false;
        if (createdate != null ? !createdate.equals(that.createdate) : that.createdate != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + roleid;
        result = 31 * result + sysid;
        result = 31 * result + (isedit ? 1 : 0);
        result = 31 * result + (createdate != null ? createdate.hashCode() : 0);
        return result;
    }
}
